/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package br.com.webfis.modelos;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author silvio
 */
@Entity
@Table(name = "destinatario")
@NamedQueries({
    @NamedQuery(name = "Destinatario.findAll", query = "SELECT d FROM Destinatario d")})
public class Destinatario implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id_destinatario")
    private Integer idDestinatario;
    @Basic(optional = false)
    @Column(name = "destinatario")
    private String destinatario;

    public Destinatario() {
    }

    public Destinatario(Integer idDestinatario) {
        this.idDestinatario = idDestinatario;
    }

    public Destinatario(Integer idDestinatario, String destinatario) {
        this.idDestinatario = idDestinatario;
        this.destinatario = destinatario;
    }

    public Integer getIdDestinatario() {
        return idDestinatario;
    }

    public void setIdDestinatario(Integer idDestinatario) {
        this.idDestinatario = idDestinatario;
    }

    public String getDestinatario() {
        return destinatario;
    }

    public void setDestinatario(String destinatario) {
        this.destinatario = destinatario;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idDestinatario != null ? idDestinatario.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Destinatario)) {
            return false;
        }
        Destinatario other = (Destinatario) object;
        if ((this.idDestinatario == null && other.idDestinatario != null) || (this.idDestinatario != null && !this.idDestinatario.equals(other.idDestinatario))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "br.com.webfis.modelos.Destinatario[ idDestinatario=" + idDestinatario + " ]";
    }
    
}
